@extends('default.layouts.adminPublic')
@section('title', '修改红包')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/vendor/jedate/skin/jedate.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/admin/indexList.css')}}">
    <style>
        .wicon{ background-image:url("");
            background-repeat:no-repeat; background-position:right center; cursor:pointer; }
    </style>
    @endsection
    @section('content')
            <!--导航开始-->
    <div class="crumb_warp">
        <i class="fa fa-home"></i> <a href="{{url('admin/activity_com_red_packet')}}">首页</a> &raquo; 红包
    </div>
    <!--导航结束-->
    <!--结果集标题与导航组件 开始-->
    <div class="con">

        <div class="conMain">
            <div class="manage"><h1>修改红包</h1></div>
            <div class="conInfo">
                <div class="manage" style="padding: 0; margin-bottom: 10px;">
                    @if(count($errors)>0)
                        <div class="mark">
                            @if(is_object($errors))
                                @foreach($errors->all() as $error)
                                    <p>{{$error}}</p>
                                @endforeach
                            @else
                                <p>{{$errors}}</p>
                            @endif
                        </div>
                    @endif
                </div>
                <div class="conAddList">
                    <form action="{{url('admin/activity_com_red_packet/'.$redPacket->id)}}" method="post" name="redPacketForm"
                          id="redPacketForm" enctype="Multipart/form-data">
                        {{csrf_field()}}
                        <input type="hidden" name="_method" value="put">
                        <input type="hidden" name="id" value="{{$redPacket->id}}">
                        <dl>
                            <dt>赠送会员职位数：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;"
                                       value="{{$redPacket->vip_post_number}}" name="vip_post_number"
                                       id="vip_post_number"></dd>
                        </dl>

                        <dl>
                            <dt>会员简历数：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;" value="{{$redPacket->vip_resume_number}}"
                                       name="vip_resume_number" id="vip_resume_number"></dd>
                        </dl>
                        <dl>
                            <dt>会员积分：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;" name="vip_integral"
                                       value="{{$redPacket->vip_integral}}" id="vip_integral"></dd>
                        </dl>
                        <dl>
                            <dt>非会员简历数：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;" value="{{$redPacket->resume_number}}"
                                       name="resume_number" id="resume_number"></dd>
                        </dl>
                        <dl>
                            <dt>非会员积分：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;" value="{{$redPacket->integral}}"
                                       name="integral" id="integral"></dd>
                        </dl>
                        <dl>
                            <dt>会员天数：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;" name="viptime"
                                       value="{{$redPacket->viptime}}" id="viptime"></dd>
                        </dl>
                        <dl>
                            <dt>最大分享次数：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;" value="{{$redPacket->frequency}}"
                                       name="frequency" id="frequency"></dd>
                        </dl>
                        <dl>
                            <dt>分享时间间隔：</dt>
                            <dd><input type="text" class="inpText" style="width:140px;" value="{{$redPacket->time_interval}}"
                                       name="time_interval" id="time_interval"><span>单位：小时</span></dd>
                        </dl>
                        <dl>
                            <dt><i class="require">*</i>活动结束日期：</dt>
                            <dd>
                                <input class="wicon" name="end_at" style="width:180px;" id="end_at"
                                       value="{{$redPacket->end_at}}" type="text" readonly>
                            </dd>
                        </dl>
                        <dl>
                            <dt>图片地址：</dt>
                            <dd>
                                <input type="file" id="input"  multiple="multiple" name="pic_url[]">
                                <span style="color: #ff4400">注：按住“ctrl”键，鼠标可选取多张图片,文件大小大不能超过2M,文件类型只能为 png, jpeg , jpg 或 gif的图片！</span>
                            </dd>
                        </dl>
                        <dl style="height: 100px;">
                            <dt style="height:100px;"><i class="require">*</i>红包描述：</dt>
                            <dd>
                                <textarea name="description" style="height: 68px; width:525px;">{{$redPacket->description or old('description')}}</textarea>
                            </dd>
                        </dl>
                        <dl>
                            <dt></dt>
                            <dd>
                                <input type="submit" class="sub" value="修改红包">
                                <input type="button" class="sub but" onclick="history.go(-1)" value="返回">
                            </dd>
                        </dl>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--结果集标题与导航组件 结束-->
@endsection

@section('footerjs')
    @parent
    <script type="text/javascript" src="{{asset('/vendor/jedate/jquery.jedate.min.js')}}"></script>
    <script>
        //蓝色风格
        $.jeDate('#end_at', {
            format: 'YYYY-MM-DD',
            festival: true
        });

    </script>
@endsection

